/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package persistencia;

import entity.DirRegional;
import java.io.FileOutputStream;
import java.io.PrintStream;

/**
 *
 * @author jakson
 */
public class SalvarDirRegional {

    public static String regionalTxt = "src/arquivo/dir_Regional.txt";

    public void gravarDirRegional(DirRegional a) {


        FileOutputStream out;
        PrintStream arq;
        try {
            out = new FileOutputStream(regionalTxt, true);
            arq = new PrintStream(out);
            arq.println(a.getNome());
            arq.println(a.getEndereco());
            arq.println(a.getCpf());
            arq.println(a.getDataNascimento());
            arq.println(a.getUsuario());
            arq.println(a.getAgencia());
            arq.println(a.getSenha());

            arq.close();
        } catch (Exception e) {
            System.err.println(e);
        }

    }
}
